using System;
using System.Collections.Generic;
using System.Configuration;
using System.Text;
using System.Windows.Forms;
using SharepointSolutionInstaller.Utils.Configuration;

namespace SharepointSolutionInstaller.Views
{
    public class InstallerControl : UserControl
    {
        private string title;
        private string subTitle;

        protected InstallerControl()
        {
        }

        public string Title
        {
            get { return title; }
            set { title = value; }
        }

        public string SubTitle
        {
            get { return subTitle; }
            set { subTitle = value; }
        }

        public static bool isOfficeSolutionInstalled
        {
            get;
            set;
        }

        public static bool isOfficeSolutionFileExist
        {
            get;
            set;
        }

        public static bool installOfficeSolution
        {
            get;
            set;
        }

        protected InstallerContainerControl Form
        {
            get
            {
                return (InstallerContainerControl)this.ParentForm;
            }
        }

        protected internal virtual void Open(InstallOptions options) { }

        protected internal virtual void Close(InstallOptions options) { }

        protected internal virtual void RequestCancel()
        {
            if (this as DetailsView != null)
                Application.Exit();
            else
            {

                if (MessageBox.Show("Are you sure you want to cancel SharePoint List Security setup?", "SharePoint List Security", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes)
                    Application.Exit();
            }
        }

        private void InitializeComponent()
        {
            this.SuspendLayout();
            this.Name = "InstallerControl";
            this.ResumeLayout(false);

        }






    }
}
